Use AFLAGS for assembly files so we can "+=" more flags.
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Thu, 30 Mar 2006 13:31:57 +0000 (14:31 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Thu, 30 Mar 2006 13:31:57 +0000 (14:31 +0100)
From: Jimi Xenidis <jimix@watson.ibm.com>

Signed-off-by: Keir Fraser <keir@xensource.com>
xen/Rules.mk
xen/arch/ia64/Makefile
xen/arch/x86/Makefile

index f887ea44f502cede6aeb9767bb402e606bc65885..ade8b87a1e2e0c438c5a5410180a54e3ecd11dbd 100644 (file)
@@ -55,11 +55,14 @@ ifneq ($(max_phys_cpus),)
 CFLAGS-y               += -DMAX_PHYS_CPUS=$(max_phys_cpus)
 endif
 
+AFLAGS-y               += -D__ASSEMBLY__
+
 ALL_OBJS := $(ALL_OBJS-y)
 CFLAGS   := $(strip $(CFLAGS) $(CFLAGS-y))
+AFLAGS   := $(strip $(AFLAGS) $(AFLAGS-y))
 
 %.o: %.c $(HDRS) Makefile
        $(CC) $(CFLAGS) -c $< -o $@
 
 %.o: %.S $(HDRS) Makefile
-       $(CC) $(CFLAGS) -D__ASSEMBLY__ -c $< -o $@
+       $(CC) $(CFLAGS) $(AFLAGS) -c $< -o $@
index 444f4eb30bd2e2cb31f4997dc40e48be61eea68a..381c6d739b1a5a390ac076c034fc89bc0b6f0374 100644 (file)
@@ -76,7 +76,7 @@ $(BASEDIR)/include/asm-ia64/.offsets.h.stamp:
 
 # I'm sure a Makefile wizard would know a better way to do this
 xen.lds.s: xen/xen.lds.S
-       $(CC) -E $(CPPFLAGS) -P -DXEN -D__ASSEMBLY__ \
+       $(CC) -E $(CPPFLAGS) -P -DXEN $(AFLAGS) \
                -o xen.lds.s xen/xen.lds.S
 
 clean:: FORCE
index 3fa20dd7d0b11f656980d651bd33927ce4bf352a..c7a2e6ae1ddcd660d502071fb23a724b7976317f 100644 (file)
@@ -72,7 +72,7 @@ asm-offsets.s: $(TARGET_SUBARCH)/asm-offsets.c $(HDRS)
        $(CC) $(CFLAGS) -S -o $@ $<
 
 xen.lds: $(TARGET_SUBARCH)/xen.lds.S $(HDRS)
-       $(CC) $(CFLAGS) -P -E -Ui386 -D__ASSEMBLY__ -o $@ $<
+       $(CC) $(CFLAGS) -P -E -Ui386 $(AFLAGS) -o $@ $<
 
 boot/mkelf32: boot/mkelf32.c
        $(HOSTCC) $(HOSTCFLAGS) -o $@ $<